import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class DecorationPage extends StatelessWidget {
  final SystemUiOverlayStyle _style =
      SystemUiOverlayStyle(statusBarColor: Colors.transparent);

  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(_style);
    // TODO: implement build
    return MaterialApp(
      home: DecorationWidget(),
      theme: ThemeData(primarySwatch: Colors.yellow),
    );
  }
}

class DecorationWidget extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _DecorationPage();
  }
}

class _DecorationPage extends State<StatefulWidget> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("Decoration Page"),
      ),
      body: DecoratedBox(
          decoration: BoxDecoration(
        gradient: LinearGradient(colors: [Colors.yellow, Colors.green]),
        borderRadius: BorderRadius.all(Radius.circular(3.0)),
        boxShadow: [
          BoxShadow(color: Colors.black, offset: Offset(4, 4), blurRadius: 4.0)
        ],
      ),
      child: FlatButton(onPressed: null, child: Text("Test button")),
      ),
    );
  }
}
